FROM ubuntu
COPY files/sources.list /etc/apt/
# 跳过相关的timezone选择
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y apt-utils 2>&1 | \
    grep -v "^debconf: delaying package configuration, since apt-utils.*" \
         && echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
         && apt-get install -y -q \
         && apt-get autoremove \
         && apt-get -y install zsh sudo curl unzip net-tools fd-find wget ranger fontconfig software-properties-common \
         && useradd -rm -d /home/frank -s /usr/bin/zsh -p "$(openssl passwd -1 qwer)" frank \
         && echo "frank ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
         && curl -fsSL https://gitee.com/yefengwu/shellconfig/raw/main/.config/scripts/preinstall.sh | bash 
USER frank
WORKDIR /home/frank
RUN git init --initial-branch=main . && git pull https://gitee.com/yefengwu/shellconfig.git main \
        && echo "export USER=`whoami` SHELL=/usr/bin/zsh" >> .zshrc 
CMD ["zsh"]

